<?php include('../includes/connect.php'); ?>
<html>
<head>
<title>FbApp</title>

<!-- validation -->
		<link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<link rel="stylesheet" href="../css/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
		<script src="../js/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="../js/jquery.validationEngine.js" type="text/javascript"></script>

		<script>	
		$(document).ready(function() {
			$("#addques").validationEngine()
		});
		 function validate2fields(){
			if($("#fname").val() =="" ||  $("#lname").val() == ""){
				return false;
			}else{
				return true;
			}
		} 
		</script>
		<!-- validation end -->

</head>
<body>
		<center>
		<form name="addques" id="addques" method="post" action="addque_process.php">
		<table style="border:2px solid #ccc;padding:8px;" width="30%" cellpadding="2" cellspacing="0">
					<tr><td colspan="2"><B>Add Question</B></td></tr>
					<tr>
						<td>Select Apps</td>
						<td><select name="app" id="app" class="validate[required]">
							<option value="">--Select--</option>
							<?php $sql=mysql_query("select * from app");
							while($row=mysql_fetch_array($sql))
							{
							?>
							<option value="<?php echo $row['app_id']; ?>"><?php echo $row['app']; ?></option>
							<?php
							}
							?>
							</select>
						</td>
					</tr>
                    <tr>
						<td>Question : </td>
						<td><textarea name="que" id="que" cols="20" rows="5" class="validate[required,length[6,300]] text-input"></textarea></td>
					</tr>
                    <tr>
						<td>Description : </td>
						<td><textarea name="desc" id="desc" cols="20" rows="5" class="validate[required,length[6,300]] text-input"></textarea></td>
					</tr>
					<tr>
						<td colspan="2"><input type="submit" value="submit"></td></tr>
					
		</table>
		</form>
		</center>
</body>
</html>